<div class="search-box">
	<form class="search_form layui-form" lay-filter="pikuan_search_form">
		<div class="layui-inline">
			<label class="layui-form-label">回款编号</label>
			<div class="layui-input-inline">
				<input type="text" name="return_code" style="width: 300px;" placeholder="支持多个回款编号,英文逗号分割" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-input-inline">
			<select name="is_mul" lay-filter="is_mul" id="is_mul">
				<option value="">多编号</option>
				<option value="0">否</option>
				<option value="1">是</option>
			</select>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">打款单位</label>
			<div class="layui-input-inline">
				<input type="text" name="title" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">订单号</label>
			<div class="layui-input-inline">
				<input type="text" name="order_no" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-input-inline">
			<select name="admin_id" lay-filter="admin_id" id="admin_id">
				<option value="">操作人</option>
				{volist name="admin_arr" id="admin"}
				<option value="{$key}">{$admin}</option>
				{/volist}
			</select>
		</div>
		<div class="layui-input-inline">
			<select name="order_type" lay-filter="order_type" id="order_type">
				<option value="">认款状态</option>
				<option value="-2">后台匹配中</option>
				<option value="-1">无匹配订单</option>
				<option value="0">有匹配订单</option>
				<option value="1">已认款</option>
				<option value="3">待核实</option>
				<option value="2">已确认</option>
			</select>
		</div>
		<div class="layui-input-inline">
			<select name="zhiyi_state" lay-filter="zhiyi_state" id="zhiyi_state">
				<option value="">质疑状态</option>
				<option value="0">等待处理</option>
				<option value="1">已处理-通过</option>
				<option value="2">已处理-驳回</option>
			</select>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<input type="text" name="min_order_money" autocomplete="off" class="layui-input" placeholder="最低金额">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="max_order_money" autocomplete="off" class="layui-input" placeholder="最高金额">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="order_money" autocomplete="off" class="layui-input" placeholder="准确金额">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">质疑人</label>
			<div class="layui-input-inline">
				<input type="text" name="zhiyiren" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-input-inline">
			<select name="dianqiantai" lay-filter="dianqiantai" id="dianqiantai">
				<option value="">点前台</option>
				<option value="0">否</option>
				<option value="1">是</option>
			</select>
		</div>
		<div class="layui-input-inline">
			<input type="text" name="pay_time_start" id="pay_time_start_3" autocomplete="off" class="layui-input" placeholder="回款开始日期">
		</div>
		<div class="layui-input-inline">
			<input type="text" name="pay_time_end" id="pay_time_end_3" autocomplete="off" class="layui-input" placeholder="回款结束日期">
		</div>
		<div class="layui-input-inline">
			<input type="text" name="create_time_start" id="create_time_start_3" autocomplete="off" class="layui-input" placeholder="认款开始日期">
		</div>
		<div class="layui-input-inline">
			<input type="text" name="create_time_end" id="create_time_end_3" autocomplete="off" class="layui-input" placeholder="认款结束日期">
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<button lay-submit lay-filter="pikuan_search_btn" id="pikuan_search_btn"
					class="layui-btn layui-btn-normal layui-btn-sm layui-bg-red">搜 索</button>
			</div>
		</div>
		<div class="pack-up"></div>
	</form>
</div>
<table class="layui-hide" id="pikuan_list" lay-filter="pikuan_list"></table>
<div class="order_info_1" style="display: none;">
	<div id="is_mul" style="padding: 10px 0px;color: red; display: none;">
		一个订单对应多个编号：<span id="mul_code"></span>
	</div>
			<table class="layui-table" style="width:1740px;" lay-filter="order_view">
				<thead>
					<tr>
						<th style="width: 160px;">收货人</th>
						<th style="width: 160px;">手机号</th>
						<th style="width: 240px;">地址</th>
						<th style="width: 160px;">订单号</th>
						<th style="width: 240px;">销项票开票产品名称</th>
						<th style="width: 240px;">抬头</th>
						<th style="width: 240px;">供应商</th>
						<th style="width: 240px;">用户订单备注</th>
						<th style="width: 100px;">前端状态</th>
						<th style="width: 100px;">金额</th>

					</tr>
				</thead>
				<tbody id="order_info_box_1">

				</tbody>
			</table>
			<table class="layui-table" style="width:1000px ;" lay-filter="xinxi_view_1">
				<thead>
					<tr>
						<th style="width: 240px;">付款单位</th>
						<th style="width: 360px;">地址</th>
						<th style="width: 160px;">手机号</th>
						<th style="width: 240px;">销项票</th>
					</tr>
				</thead>
				<tbody id="pkxx_box_1">
			
				</tbody>
			</table>
		</div>
<script>
	var pikuan_list_url = "{:url('pikuan/ajaxList')}";
	var pikuan_cols = {$cols};
	var over_url = "{:url('pikuan/over')}",
		pass_url = "{:url('pikuan/pass')}",
		passmul_url = "{:url('pikuan/passmul')}",
		chk_order_url = "{:url('pikuan/chkOrder')}",
		upload_ypk = '{:url("Pikuan/yipikuan")}',
		upload_qiantai = '{:url("Pikuan/qiantai")}',
		exportrk_url = '{:url("Pikuan/exportrk")}',
		viewZhiyiOrder_url = '{:url("Pikuan/viewZhiyiOrder")}',
		reject_url = "{:url('pikuan/reject')}",
		rejectmul_url = "{:url('pikuan/rejectmul')}";
</script>
<script type="text/html" id="pikuanToolbar">
	<div class="layui-btn-container">
		<a type="button" id="yipikuan" data-id="yipikuan" data-url="{:url('pikuan/yipikuan')}" data-title="导入已匹款"
		 class="layui-btn layui-btn-warm layui-btn-sm" lay-event="yipikuan">导入已匹款</a>
		<a type="button" id="exportrk" data-id="exportrk" data-url="{:url('pikuan/exportrk')}" data-title="导出查询结果"
		 class="layui-btn layui-btn layui-btn-sm" lay-event="exportrk">导出查询结果</a>
		 <button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="allPass"><i class="layui-icon layui-icon-component"></i>批量成功</button>
		 <button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="allReject"><i class="layui-icon layui-icon-component"></i>批量驳回</button>
		
		<!-- <a type="button" id="qiantai" data-id="qiantai" data-url="{:url('pikuan/qiantai')}" data-title="导入前台状态"
		 class="layui-btn layui-btn-sm" lay-event="qiantai">导入前台状态</a> -->
	</div>
</script>
<script type="text/html" id="jun_order_stateTpl">
    {{# var text = ''; 
    switch(d.jun_order_state){ 
        case 0: text = '<span style="color: #FF5722;">无效订单</span>';break;
        case 1: text = '<span style="color: #FF5722;">待确认</span>'; break; 
        case 2: text = '<span style="color: #FFB800;">待发货</span>'; break; 
        case 3: text = '<span style="color: #01AAED;">待支付</span>'; break; 
        case 4: text = '<span style="color: #2F4056;">待收货</span>'; break; 
        case 5: text = '<span style="color: #009688;">已完成</span>'; break; 
        case 6: text = '<span style="color: #c2c2c2;">已退货</span>';break;
        case 7: text = '<span style="color: #c2c2c2;">已取消</span>';break;
        case 8: text = '<span style="color: #c2c2c2;">待妥投</span>'; break; 
        case 9: text = '<span style="color: #c2c2c2;">已废止</span>'; break; 
        default: text = '<span style="color: #c2c2c2;">未同步</span>'; break; 
    } 
        return text; 
    }}
    </script>
<script type="text/html" id="pikuan_tool">
	<div class="layui-btn-group">
		{{# if(d.state == 2){ }}
			<span style="color:green">已确认</span>
		{{# } }}
		{{# if(d.state == 1 && d.zhiyi_state != 0){ }}
			<a class="layui-btn layui-btn-normal layui-btn-xs tap-nav" lay-event="over" data-title="完成"><i
				 class="layui-icon layui-icon-vercode"></i></a>
		{{# } }}
		{{# if(d.zhiyi_state == 0){ }}
					<a class="layui-btn layui-btn-xs  layui-btn-normal" lay-event="view" data-title="查看">
						<i class="layui-icon layui-icon-rate-solid"></i>
					</a>
					<a class="layui-btn layui-btn-xs tap-nav" lay-event="pass" data-title="通过"><i
						 class="layui-icon layui-icon-ok"></i></a>
					<a class="layui-btn layui-btn-danger layui-btn-xs tap-nav" lay-event="reject" data-title="驳回"><i
						 class="layui-icon layui-icon-close"></i></a>
		{{# } }}
		{{# if(d.zhiyi_state == 1 && d.state != 2){ }}
					<a class="layui-btn layui-btn-danger layui-btn-xs tap-nav" lay-event="reject" data-title="驳回"><i
						 class="layui-icon layui-icon-close"></i></a>
		{{# } }}
	</div>
</script>
<script type="text/html" id="zhiyiTpl">
	{{# 
		try{
			return d.zhiyi_order.split(",").join("<br />"); 
		} catch(error){
			return ''
		}
	}}
</script>
<script type="text/html" id="stateTpl"> 
	{{# if(d.state == -2){}}
		<div class="layui-anim circle layui-bg-gray" data-title="后台匹配中">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }else if(d.state == -1){ }}
		<div class="layui-anim circle layui-bg-black" data-title="无匹配订单">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }else if(d.state == 0){ }}
		<div class="layui-anim circle layui-bg-cyan" data-title="有匹配订单">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }else if(d.state == 1){ }}
		<div class="layui-anim circle layui-bg-green" data-title="已认款">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }else if(d.state == 3){ }}
		<div class="layui-anim circle layui-bg-orange" data-title="待核实">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }else if(d.state == 2){ }}
		<div class="layui-anim circle layui-bg-blue" data-title="已完成">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
	{{# }}}
</script>
<script type="text/html" id="is_mulTpl">
{{# if(d.is_mul == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="是">
		<i class="layui-icon layui-icon-radio"></i>
	</div>

{{# } else {}}
			<div class="layui-anim circle layui-bg-green" data-title="否">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
{{# }}}
</script>
<script type="text/html" id="is_mulTpl">
{{# if(d.is_mul == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="是">
		<i class="layui-icon layui-icon-radio"></i>
	</div>

{{# } else {}}
			<div class="layui-anim circle layui-bg-green" data-title="否">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
{{# }}}
</script>
<script type="text/html" id="dianqiantaiTpl">
{{# if(d.dianqiantai == 0){}}
	<div class="layui-anim circle layui-bg-orange" data-title="否">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
		{{# }else { }}
			<div class="layui-anim circle layui-bg-green" data-title="是">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# } }}
</script>
<script type="text/html" id="zhiyi_stateTpl">
{{# if(d.zhiyi_state == 0){}}
	<div class="layui-anim circle layui-bg-orange" data-title="等待处理">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.zhiyi_state == 1) { }}
		<div class="layui-anim circle layui-bg-green" data-title="已通过">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
		{{# }else { }}
			<div class="layui-anim circle layui-bg-red" data-title="已驳回">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# } }}
</script>
<script src="/static/js/pikuan/pikuan.js?t=20231109" type="text/javascript" charset="utf-8"></script>
<style>
	.layui-table-cell{
		height: auto!important;
	}
</style>